home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0993sept.archive
/
000078_crash!fwi.uva.nl!oortmers_Thu, 30 Sep 93 02:23:11 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
3KB
Received: by bkhouse.cts.com (V1.16/Amiga)
id AA00000; Thu, 30 Sep 93 02:23:11 PST
Received: from mail.fwi.uva.nl by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0oiCFL-0000K3C; Wed, 29 Sep 93 17:51 PDT
Received: from gene.fwi.uva.nl by mail.fwi.uva.nl with SMTP (5.65c/5.1)
id AA20398; Thu, 30 Sep 1993 01:51:46 +0100
Received: by gene.fwi.uva.nl
id AA28999; Thu Sep 30 01:51:45 1993
Message-Id: <199309300051.AA28999@gene.fwi.uva.nl>
Date: Thu, 30 Sep 1993 01:51:45 +0100
Return-Path: <oortmers@fwi.uva.nl>
X-Organisation: Faculty of Mathematics & Computer Science
University of Amsterdam
Plantage Muidergracht 24
NL-1018 TV Amsterdam
The Netherlands
X-Phone: +31 20 525 5200
X-Telex: 16460 facwn nl
X-Fax: +31 20 525 5101
From: oortmers@fwi.uva.nl (Wouter van Oortmerssen (Alfa_Inf92))
To: amigae@bkhouse.cts.com
Subject: GTSL_DISPFUNC
>> Hi all,
>>
>> I'm having probs with a slidergadget and it's GTSL_DISPFUNC tagitem. This
>> tagitem is meant to add a function to the slider that calculates the level
>> to be displayed near to the slider.
It seems like there are some uncertainties about how to call E
procedures from other places (like tasks). The problems with this is
that lots of E code is dependant on a global environment, which demands
pretty tricky code to restore. that's why with v2.5 there'll probably
be modules for tasks, hooks etc.
>> For example, it may be needed to use the slider to select a screen depth,
>> while the levelvalue is the number of colours, here 2^level.
with a function like this we can do it the easy way, since computing
2^level doesn't require an environment.
>> The problem is that I can't attach a function (a PROC) to this tag properly,
>> as the system crashes when I move the slider (and the system wants to call
>> my function calculate the according value to be displayed.
>>
>> I attach the function as follows:
>>
>> GTSL_DISPFUNC,{calculatelevel}
>>
>> but I have no idea how the function should read the arguments it gets, (I
>> believe a window pointer and a gadgetpointer, but I'm not sure as I don't
>> carry my RKRM'S with me all the time :o)
>>
>> Can anyone give an example of how this must be done?
sure, how about:
IF (g:=CreateGadgetA(SLIDER_KIND,g,
[offx+150,offy+61,315,27,'slider: ',tattr,2,0,visual,0]:newgadget,
[GTSL_MIN,1,
GTSL_MAX,5,
GTSL_LEVEL,2,
GTSL_MAXLEVELLEN,2,
GTSL_LEVELFORMAT,'\d[2]',
GTSL_DISPFUNC,{depth2colours},
NIL]))=NIL THEN RETURN NOGADGET
and:
PROC depth2colours(level,gad:PTR TO gadget) RETURN Shl(1,level)
>> --
>> Signatures sold out at the time.... Leon Woestenberg (leon@stack.urc.tue.nl)
>> If lines are busy, try later. But DO call!
>> --
Wouter
____ Wouter van Oortmerssen, Wouter@alf.let.uva.nl
/ __/ "Einen Satz verstehen, heisst, wissen was der Fall ist,
/ __/ wenn er wahr ist" - Wittgenstein
/___/ ->subscribe to the E mailing list: amigae-request@bkhouse.cts.com<-